package com.ytjj.qmyx.admin.service.impl;

import com.ytjj.qmyx.admin.dao.ReissueLogisticsNoteDao;
import com.ytjj.qmyx.admin.service.MemberService;
import com.ytjj.qmyx.admin.service.ReissueLogisticsNoteService;
import com.ytjj.qmyx.mall.model.ReissueLogisticsNote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 *
 * 
 * @Version: 1.0
 */
@Service
public class ReissueLogisticsNoteServiceImpl implements ReissueLogisticsNoteService {

    @Autowired
    private ReissueLogisticsNoteDao reissueLogisticsNoteDao;

    @Autowired
    private MemberService memberService;

    @Override
    public List<ReissueLogisticsNote> selectList(Integer reissueLogisticsId) {
        return reissueLogisticsNoteDao.selectList(reissueLogisticsId);
    }

    @Override
    public Integer insertNote(ReissueLogisticsNote reissueLogisticsNote) {
        reissueLogisticsNote.setAdminName(memberService.getAdmin().getName());
        reissueLogisticsNote.setCreateTime(new Date());
        return reissueLogisticsNoteDao.insertNote(reissueLogisticsNote);
    }

}
